<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			#box{
				width: 50px;
				height: 50px;
				margin: 0 auto;
				background: yellowgreen;
			}
		</style>
	</head>
	<body>
		<div id="box"></div>
		<script type="text/javascript">
			var box=document.getElementById('box');
			var i=0;
			box.onclick=function(){
				i++;
				if(i%2==0){
					box.style.width='50px';
					box.style.height='50px';
				}else{
					box.style.width='200px';
					box.style.height='200px';
				}
			}
		</script>
	</body>
</html>
